<?php
session_start();
$productid = $_SESSION['productid'];
$title = $_SESSION['title'];
$author=$_SESSION['author'];
$category=$_SESSION['category'];
$price=$_SESSION['price'];
$date=$_SESSION['date'];
$description=$_SESSION['description'];
$imageurl=$_SESSION['imageurl'];

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>user details</title>
</head>

<body>

<?php
		  			$host="localhost";
                    $dbusername="root";
                    $dbpassword="";
                    $database="books";
                    $x=mysql_connect($host,$dbusername,$dbpassword);
                    $x2=mysql_select_db($database);
					
					$query = "update products set title = '".$title."',author ='".$author."',description ='".$description."',price ='".$price.     "',category ='".$category."',date ='".$date."',imageurl ='".$imageurl."'where productid ='".$productid ."'";
                    $result=mysql_query($query);
					
			
					if($result==1)
					{
					echo "Product Details Updated !!";
					}
					else
					{
						echo " Failed !!" ;

					}
									 
		 ?>
</body>
</html>